package top.chengdongqing.mishop.repositories

import org.springframework.data.jpa.repository.JpaRepository
import top.chengdongqing.mishop.entities.User

interface UserRepository : JpaRepository<User, Int> {

    fun findByPhoneNumberOrEmailAddress(phoneNumber: String, emailAddress: String): User?

    fun findByPhoneNumber(phoneNumber: String): User?

    fun existsByPhoneNumber(phoneNumber: String): Boolean

    fun existsByEmailAddress(emailAddress: String): Boolean
}